<?php


namespace Part02_StrategyMode\Code5;


class CashContext
{
    private $cashObj;

    public function __construct($cashObj)
    {
        $this->cashObj = $cashObj;
    }

    /**
     * @param $money
     * @return mixed
     * @date: 2021/9/10
     * @desc: 根据策略的不同，获得计算结果
     */
    public function GetResult($money)
    {
        return $this->cashObj->acceptCash($money);
    }

}